{% extends 'system_template/public/base_main.html' %}
{% block cite %}
    数据监控系统(实时)
{% endblock %}
{% block reload %}
{% endblock %}
{% block content %}
    <script type="text/javascript" src="{{ url_for('static',filename='js/echarts.min.js') }}"></script>
    <div class="layui-tab layui-tab-brief"  style="margin: 0;margin-top: -15px;">
        <div class="layui-tab-content">
            <div class="layui-tab-item layui-show" id="_content" style="width:100%; height:500%;">数据努力加载中...</div>
        </div>
    </div>
{% endblock %}
{% block footer %}
    <script>
        $(function () {content();setInterval(content, 30000);});
        function content() {
            var chart = echarts.init(document.getElementById('_content'), 'white', {renderer: 'canvas'});
            $.ajax({
                type: "GET",
                url: "{{ url_for('sys_bp.visit_chart') }}",
                dataType: 'json',
                success: function (result) {chart.setOption(result);}
            });
        }
    </script>
{% endblock %}